home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / DB_CLIPP / 3032.ZIP / AHELP5.ZIP / AHELP.DOC next >
Text File  |  1990-11-04  |  18KB  |  426 lines

  1.  
  2.      AHELP.LIB - ADVANCED HELP SYSTEM FOR CLIPPER (SUMMER '87) APPLICATIONS
  3.  Version 1.3                                   Copyright (C) 1990, Capella Inc.
  4.  
  5.  
  6.  For a printed copy of this user guide, copy this file to your printer.
  7.  
  8.  
  9.  Introduction
  10.  ------------
  11.  
  12.  Welcome to AHELP!  This help system, for use with your Clipper applications
  13.  (Summer '87), provides both context-sensitive and generalized help windows.
  14.  Features of AHELP version 1 (be sure to see version 2, p.7):
  15.  
  16.  * You control whether help windows have no border, a single-line border, or
  17.    a double-line border.
  18.  
  19.  * You control whether the cross-bars drawn inside the help windows have no
  20.    line, a single line, or a double line.
  21.  
  22.  * AHELP automatically determines the appropriate intersections.
  23.  
  24.  * You control what colors AHELP will use for the help window border, title,
  25.    content, and highlight bar in the help index window.
  26.  
  27.  * You control whether or not the end user has the ability to create or
  28.    modify help windows.
  29.  
  30.  * You control whether or not the help windows have drop shadows.
  31.  
  32.  * AHELP automatically positions the help window immediately below the screen
  33.    position of the input variable (e.g., a GET variable) if the window will fit
  34.    there; otherwise, the window appears immediately above the input variable.
  35.  
  36.  * AHELP provides a help index; whenever any help window is on the screen,
  37.    the user may press F1 to see the help index.  The help index is another
  38.    window with a scrolling alphabetic listing of help subjects.  The user
  39.    uses the cursor control keys to highlight the subject of interest, and
  40.    presses Enter to see the corresponding help window.  The user may also
  41.    type the first letter of the subject to move the highlight bar immediately
  42.    to the first occurrence of that letter.
  43.  
  44.  * AHELP is sensitive to the Clipper environment.  If the cursor is off when
  45.    help is invoked, it will be off when control returns to your application.
  46.    Conversely, if the cursor is on when help is invoked, it will be on when
  47.    control returns to your application.  The same principle applies to colors,
  48.    function keys, insert status, work area, and the status of SET CONSOLE,
  49.    DELETED, ESCAPE, and SCOREBOARD.
  50.  
  51.  * AHELP does not use any "wait state" commands (READ, WAIT, ACCEPT, INPUT,
  52.    MENU TO), to avoid conflicts with any pending GETs.  It uses the INKEY()
  53.    function for all keyboard input, with two exceptions: it calls DBEDIT() for
  54.    the help index window and MEMOEDIT() for displaying/editing help text.
  55.  
  56.  
  57.  
  58.  What do you have to do in order to use AHELP?  Three things:
  59.  
  60.  1.  Insert a call to AHELP in your application with the setup parameters you
  61.      want to use as described in the next section.
  62.  
  63.  2.  Insert the command SET KEY XX TO AHELP in your application.
  64.  
  65.  3.  Compile your application and link, specifying AHELP.LIB as one of the
  66.      LIB files (AHELP requires both CLIPPER.LIB and EXTEND.LIB).
  67.  
  68.  That's all.  The rest is transparent to your application.
  69.  
  70.  
  71.  Setup
  72.  -----
  73.  
  74.  The application must call AHELP with four parameters before starting the user
  75.  interface, in order to initialize the help system.  During initialization,
  76.  AHELP declares four PUBLIC memory variables:
  77.  
  78.     HELPFILE   - the name of the application's help file
  79.     HELPOPTN   - a character string of application options
  80.     HELPCODE   - a character string for use by the application when no input
  81.                  variable is waiting -- AHELP uses the content of `HELPCODE' as
  82.                  its third parameter if the Clipper-passed third parameter is
  83.                  empty
  84.   and
  85.     HELPACTIVE - a logical variable set to true when AHELP is executing, and
  86.                  false otherwise.
  87.  
  88.  Also during initialization, AHELP checks for the existence of the help file
  89.  (and creates it if it is missing), and for the existence of the two index 
  90.  files needed (and creates them if they are missing).
  91.  
  92.  
  93.  Setup Syntax:
  94.  
  95.    DO AHELP WITH <expC1>, <expN>, <expC2>, <expA>
  96.  
  97.  where
  98.  
  99.    <expC1> is the name of the application's Help File (one to eight characters)
  100.     
  101.    <expN>  is any value (ignored by AHELP)
  102.  
  103.    <expC2> is a string of switch values: /Bn/Cn/Dn/En
  104.  
  105.         /Bn defines the help window Border: n=0 means no lines
  106.                                             n=1 means single line
  107.                                             n=2 means double line
  108.  
  109.         /Cn defines the window crossbar:    n=0 means no lines
  110.                                             n=1 means single line
  111.                                             n=2 means double line
  112.  
  113.         /Dn defines drop shadows:           n=0 means shadows are off
  114.                                             n=1 means shadows are on
  115.  
  116.  
  117.         /En defines Edit capability:        n=0 means edit is off
  118.                                             n=1 means edit is on
  119.  
  120.         These switches may appear in any order.  No other switches are defined
  121.         in version 1.  If any switch is missing, default values are:
  122.                 B = 2 (double line border)
  123.                 C = 1 (single line crossbar)
  124.                 D = 0 (drop shadows off)
  125.                 E = 1 (edit on)
  126.  
  127.    <expA>  is the name of a four-element character array containing screen
  128.            color values:
  129.         element 1 = foreground/background colors, help window content
  130.         element 2 = foreground/background colors, help index highlight bar
  131.         element 3 = foreground/background colors, help window title and
  132.                     bottom-row message
  133.         element 4 = foreground/background colors, help window border
  134.  
  135.         This array is not needed after AHELP returns.
  136.  
  137.  Example 1:
  138.  
  139.    DECLARE HCOLOR[4]
  140.    HCOLOR[1] = "N/W"    && content
  141.    HCOLOR[2] = "W+/B"   && highlight
  142.    HCOLOR[3] = "B/W"    && title
  143.    HCOLOR[4] = "W+/W"   && border
  144.    DO AHELP WITH "MYAPHELP",0,"/B2/C1/D1/E0",HCOLOR
  145.                      |           |  |  |  |     |
  146.                   filename       |  |  |  |   color
  147.                             double  |  |  |   array
  148.                             border  |  |  |   name
  149.                                     |  |  |
  150.                                single  |  |
  151.                              crossbar  |  |
  152.                                        |  |
  153.                                      drop |
  154.                                   shadows |
  155.                                       on  |
  156.                                           |
  157.                                         edit
  158.                                          off
  159.  
  160.  
  161.  Example 2:
  162.    <declare color array and values as above>
  163.    DO AHELP WITH "MYAPHELP",0,"",HCOLOR        && use default switch options
  164.  
  165.  
  166.  After making this setup call, activate the "hotkey" that will invoke AHELP
  167.  with the SET KEY command.  Examples:
  168.  
  169.    SET KEY 28 TO AHELP         && F1 is the help key
  170.  
  171.    SET KEY 291 TO AHELP        && Alt-H is the help key
  172.  
  173.    SET KEY -9 TO AHELP         && F10 is the help key
  174.  
  175.  
  176.  Execution
  177.  ---------
  178.  
  179.  When the user presses the help key while your application is in any wait
  180.  state, Clipper automatically calls AHELP with three parameters: the name of
  181.  the procedure in control when the key was pressed, the line number that was
  182.  executing, and the name of the wait state input variable.  AHELP uses the 
  183.  first and third parameters only (not all applications are compiled with line
  184.  numbers) to construct a "seek key".  It opens the help file and performs a
  185.  seek for that key.
  186.  
  187.  If the key is found, AHELP opens a help window and displays the help text; the
  188.  window is opened as close as possible to the input variable screen position.
  189.  
  190.  If the key is not found, AHELP opens a smaller help window in the center of
  191.  the screen and notifies the user that no help is available.
  192.  
  193.  Either window will show available options at the bottom of the window: Escape
  194.  to cancel help, F1 to call up the help index, and F4 to edit or create the
  195.  help display (if editing is enabled).
  196.  
  197.  Cancel:  If the user presses Escape, AHELP closes the help window and returns
  198.  to your application.
  199.  
  200.  Help Index:  If the user presses F1, AHELP closes the help window, opens a
  201.  help index window, and displays a scrolling list of help subjects.  The user
  202.  may press Escape again (AHELP will close the window and return), or move the
  203.  highlight bar to the desired subject and press Enter to select that subject.
  204.  AHELP will close the window and use the subject as the new seek key.
  205.  
  206.  Edit:  If the user presses F4, AHELP turns on the cursor and allows the user
  207.  to modify or add text until F2 is pressed (to save any changes).  The user
  208.  may press Escape to abort this process, which restores the original help text
  209.  (if any) and cancels the edit process.  If the user chooses to save changes,
  210.  AHELP prompts for a new title for the help text, and for a new index subject;
  211.  both are optional.  Any title is converted to upper case and centered when the
  212.  help window is recalled, prefixed with the words "Help on".  If there is no
  213.  title, AHELP provides the word "Help" centered at the top of the window.  If
  214.  the user specifies an index subject, AHELP adds it to the help index (below).
  215.  
  216.  Editing keys available during creation or modification of help text are those
  217.  provided by MEMOEDIT: Ctrl-Y (delete line), Ctrl-T (delete word right), Ctrl-
  218.  left arrow (cursor left one word), Ctrl-right arrow (cursor right one word),
  219.  Ctrl-B (reform paragraph), Ctrl-W (save - same as F2).
  220.  
  221.  AHELP is not intended for recursion; if the public variable HELPACTIVE is true
  222.  when AHELP is invoked, AHELP immediately returns.  Otherwise, it sets variable
  223.  HELPACTIVE to true and continues.  When AHELP is done, it resets HELPACTIVE
  224.  to false.
  225.  
  226.  
  227.  
  228.  Help Index
  229.  ----------
  230.  
  231.  The help index is basically an alphabetized table of contents for generalized
  232.  help (although context-sensitive subjects may also be listed).  The scrolling
  233.  highlight bar is used to point to the subject desired; the cursor keys move
  234.  the highlight bar, and typing a character moves the highlight bar to the first
  235.  occurrence of that character, if any.  Pressing the Enter key selects the
  236.  highlighted entry, and the Escape key cancels the help index.
  237.  
  238.  If edit is enabled, the user may press F4 to edit the highlighted entry,
  239.  Delete to delete the highlighted entry, or Insert to add a new entry.
  240.  
  241.  Edit:  If the user presses F4, AHELP opens a small window containing the index
  242.  entry, turns on the cursor, and prompts for any changes.  Pressing Enter saves
  243.  the entry; pressing Escape cancels the edit operation.
  244.  
  245.  Delete:  If the user presses Delete, AHELP opens a dialog box to confirm that
  246.  deletion is desired.  The dialog box contains two choices: "Cancel" and
  247.  "Delete".  The cursor keys switch between these choices and Enter selects the
  248.  choice that is highlighted; alternatively, typing the first letter of either
  249.  choice selects that choice.
  250.  
  251.  Insert:  If the user presses Insert, AHELP opens a small window containing a
  252.  blank index entry, turns on the cursor, and prompts for the new index entry.
  253.  Pressing Enter saves the new entry; pressing Escape cancels the add operation.
  254.  
  255.  
  256.  
  257.  Structure of Help File
  258.  ----------------------
  259.  
  260.  AHELP uses a .DBF (and associated .DBT) for help displays.  The name of the
  261.  help file is determined by the application and passed to AHELP as a parameter
  262.  in the setup call.  If AHELP is unable to find the help file in the current
  263.  directory, it creates both the .DBF and .DBT files.
  264.  
  265.  The record layout is:
  266.       Field  Field Name  Type       Width Dec  Usage
  267.           1  HELPKEY     Character     20      Seek Key (see below)
  268.           2  HELPTITL    Character     30      Title for help display
  269.           3  HELPTEXT    Memo          10      Content of help display
  270.           4  HELPSUBJ    Character     30      Subject for help index
  271.           5  HELPTROW    Numeric        2      Window top row        [reserved]
  272.           6  HELPLCOL    Numeric        2      Window left column    [reserved]
  273.           7  HELPNROW    Numeric        2      No. of window rows    [reserved]
  274.           8  HELPNCOL    Numeric        2      No. of window columns [reserved]
  275.       ** Total **                      99
  276.  
  277.  The Seek Key (field HELPKEY) consists of two concatenated ten-character
  278.  fields: the first ten characters are the name of the calling procedure,
  279.  AHELP's first parameter; and the second ten characters are the name of the
  280.  input variable, AHELP's third parameter.
  281.  
  282.  There are two index files created and maintained by AHELP: HELPKEY.N*X and
  283.  HELPSUBJ.N*X.  The filename extension, .NDX or .NTX, is determined by 
  284.  whether you link your application with Nantucket's NDX.OBJ or not.  
  285.  
  286.  
  287.  Since AHELP adds four to the number of file handles in use, you may need to
  288.  increase FILES= in CONFIG.SYS and SET CLIPPER=Fnn in AUTOEXEC.BAT.  This will
  289.  be determined by how many files your application needs to have open at one
  290.  time.
  291.  
  292.  
  293.  Reserved Names
  294.  --------------
  295.  
  296.  All function and procedure names in AHELP.LIB begin with the four letters
  297.  "HELP" followed by at least four more characters, except for the "AHELP"
  298.  procedure itself.  Your application should avoid naming any functions or
  299.  procedures in a similar fashion, to eliminate any potential conflict at link
  300.  time.  All variables used internally by AHELP are declared PRIVATE, with the
  301.  exception of the four PUBLIC variables HELPACTIVE, HELPCODE, HELPFILE, and
  302.  HELPOPTN (all of which also begin with the four letters "HELP").
  303.  
  304.  
  305.  
  306.  Version 2
  307.  ---------
  308.  
  309.  Version 2 of AHELP adds seven major features:
  310.  
  311.  *  Network capability.  AHELP opens the help file for shared use only unless
  312.     an update is required.  Then it locks the record long enough for the
  313.     update, and immediately unlocks the record.
  314.  
  315.  *  Import help displays from ASCII text files.  During creation of a new help
  316.     display, the user may press F7 to tell AHELP to import one or more lines of
  317.     text from a user-specified file.
  318.  
  319.  *  Copy or refer to an existing help display.  During creation of a new help
  320.     display, the user may press F1 to tell AHELP to open the help index window,
  321.     "point" to the desired entry, and use that help display.
  322.  
  323.  *  Key word capability.  One or two key words may be specified for each help
  324.     display, and a key word search routine allows lookup by matching against a
  325.     key word prompt.  You control whether or not this feature is enabled.  If
  326.     so, it is activated by pressing F7.
  327.  
  328.  *  Change the default screen coordinates of either the edit window or the help
  329.     window in the setup call.
  330.  
  331.  *  "Drag" or move the help window around the screen and save its new position.
  332.     You control whether or not this feature is enabled.  If it is enabled, it
  333.     is activated by pressing F5.
  334.  
  335.  *  Expand or reduce the size of the help window and save its new shape.  You
  336.     control whether or not this feature is enabled.  If it is enabled, it is
  337.     activated by pressing F6.
  338.  
  339.  Both the move and resize features store the new help window coordinates in the
  340.  help file record, so the window will be opened in its new place or shape when
  341.  recalled.
  342.  
  343.  
  344.  Registration
  345.  ------------
  346.  
  347.  There are no royalty fees for including AHELP in your applications.  The
  348.  registration fee for AHELP is $50.00 for a single-PC license.  A site license
  349.  is $400.00, and a corporate license (including full source code) is $1000.00.
  350.  Versions for Clipper S'87 and Clipper 5.0 are available; order both versions
  351.  and get a 50% discount on the second license!  The last page of this user
  352.  guide is a ready-to-mail registration form.
  353.  
  354.  Send your check or money order for the appropriate license to:
  355.                    MicroFox
  356.                    P.O. Box 447
  357.                    Richfield, OH 44286-0447
  358.                    U.S.A.
  359.  
  360.  We will send you version 2 of AHELP, and add your name(s) to our list of users
  361.  for future upgrade notices and other offers.  Specify diskette size(s).
  362.  
  363. <End of AHELP.DOC>
  364.  
  365.  
  366.                        AHELP REGISTRATION AND ORDER FORM
  367.  
  368.    Send to:        MicroFox Co.                  P.O. # _________________
  369.                    P.O. Box 447
  370.                    Richfield, OH                   DATE _________________
  371.                    44286-0447  U.S.A.
  372.  
  373.    ______________________________________________________________________
  374.  
  375.    ***  Order both S'87 AND 5.0 and take 50% off the second license!  ***
  376.    ***           (Both licenses must be at the same level.)           ***
  377.  
  378.      Single-User License ..................................... $50 U.S.
  379.  
  380.             Quantity:  Summer '87 ____   5.0 ____    SUBTOTAL  $_________ 
  381.  
  382.  
  383.      Site License (unlimited use per site) ............... $400.00 U.S.
  384.  
  385.             Quantity:  Summer '87 ____   5.0 ____    SUBTOTAL  $_________ 
  386.  
  387.  
  388.      Corporate License (unlimited use within enterprise): $1000.00 U.S.
  389.      (Includes full source code.)
  390.             Quantity:  Summer '87 ____   5.0 ____    SUBTOTAL  $_________ 
  391.  
  392.  
  393.      Each License includes a master disk. 
  394.  
  395.                                                LICENSES TOTAL  $_________
  396.    ______________________________________________________________________
  397.  
  398.  
  399.      Ohio residents add 5.5% sales tax              SALES TAX  $_________
  400.  
  401.      Shipping and handling charges:
  402.                         U.S.A. ...... $2 each        SHIPPING  $_________
  403.                         Canada ...... $3 each                          
  404.                         All others .. $5 each  
  405.                                                         TOTAL  $_________
  406.      
  407.    ______________________________________________________________________
  408.  
  409.  
  410.                  Name ___________________________________________________
  411.  
  412.               Company ___________________________________________________
  413.  
  414.               Address ___________________________________________________
  415.  
  416.                       ___________________________________________________
  417.  
  418.                       ___________________________________________________
  419.  
  420.                 Phone ___________________________________________________
  421.  
  422.  
  423.        Diskette media:     _____ 5.25" acceptable     _____ 3.5" required
  424.  
  425.  
  426.